<template>
  <el-button :type="disabled ? 'default' : 'primary'" size="large" @click="emit('buttonClick')">
    {{ isEdit ? "保存" : "编辑" }}
  </el-button>
</template>
<script setup>
const props = defineProps({
  // 可以编辑 - 展示保存按钮
  isEdit: {
    type: Boolean,
    default: false,
  },
});
const disabled = computed(() => {
  return !props.isEdit;
});
const emit = defineEmits(["buttonClick"]);
</script>
